home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung / Power-Programmierung (Tewi)(1994).iso / magazine / dbms_mag / 9103 / yellick2.mar < prev    next >
Text File  |  1991-02-04  |  490b  |  21 lines

  1. Listing 6: ListDir
  2.  
  3. function ListDir(dir_, level)
  4.     /* List the contents of an array containing a directory
  5.      structure. This function uses a recursive call to itself.*/
  6.  
  7.     local i
  8.        if level = nil
  9.          level := 0
  10.        endif
  11.        for i := 1 to len(dir_)
  12.          ? space(level *3)
  13.          if valtype(dir_[i]) = "A"
  14.          ?? dir_[i, 1]
  15.            ListDir(dir_[i, 2], level +1)
  16.          else
  17.            ?? dir_[i]
  18.          endif
  19.        next i
  20.      return nil
  21.